package com.yonyou.pmclouds.contacttype.mapper;

import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.yonyou.pmclouds.basecom.cache.RedisCache;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.contacttype.entity.ContactTypeRefVO;
import com.yonyou.pmclouds.contacttype.entity.ContactTypeVO;

@CacheNamespace(implementation = RedisCache.class)
public interface ContactTypeMapper extends BaseMapper<ContactTypeVO> {

	 @Select("select * from pmbd_contacttype where dr = 0 and pk_group = #{pk_group} order by creationtime")
	 @ResultMap("getMap")
	 List<ContactTypeVO> selectByPkGroup(String pk_group);	
	 
	 List<ContactTypeVO> checkRepeat(@Param("contype") ContactTypeVO contactTypeVO);
	 
	 List<ContactTypeRefVO> selectByProject(String pk_project);
	 
	 List<ContactTypeVO> selectByIds(String[] pk_contypes);
}
